#!/usr/bin/perl
# Generate distribution plot data
$file= $ARGV[0];
open FILE, $file or die "Cannot Open File '$file'\n";

my @noff;

while ($line= <FILE>)
{
    chomp $line;
    if ($line =~ /^maxoff=(\d+)/)
    {
	$maxoff= $1;
	$noff[$maxoff]++;
    }
}
close FILE;

for ($i= 0; $i < @noff; $i++)
{
    print qq({n:),$noff[$i]+0,qq(, off:$i},\n);
}
